package com.example.demo.Controller;

import com.example.demo.Entity.Photo;
import com.example.demo.Mapper.PhotoMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class PhotoController {
    @Resource
    private PhotoMapper photoMapper;

    @RequestMapping("/photo")
    public List<Photo> getPhoto(){
        return photoMapper.finAll();
    }
}
